/** \file
 *	\brief Utilities to build a crystal-like configuration.
 */

#ifndef MDS_CRYSTAL_INCLUDED
#define MDS_CRYSTAL_INCLUDED 1


#include "./position.h"



/** \brief Counting particles for a close packing of sphere.
 *	
 *	\param cr  the computed number of unit mesh per vertex.
 *	\param n   the desired number of particles.
 *	\param box the box where to place the particles. 
 *	\return the adjusted number of particles = 4 * cr->x * cr->y * cr->z.
 */

size_t mds_crystal_close_packed_count( mds_uvector *cr, const size_t n, const mds_vector *box );

/** \brief Build a noisy fcc configuration.
 *
 *	\param position the positions to fill.
 *	\param n the compatible number of atoms.
 *	\param cr the mesh density per vertex.
 *	\param box the box to fill.
 *	\param noise_level the noise in [0:1].
 */
void   mds_crystal_build_fcc( mds_vector_set position, const size_t n, const mds_uvector *cr, const mds_vector *box, Real noise_level );


#endif
